package com.joven.interface2.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.joven.core.model.Person;
import com.joven.interface2.mapper.PersonMapper;
import com.joven.interface2.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author joven_wong
 * 2021/6/10 16:32
 */
public class PersonServiceImpl extends ServiceImpl<PersonMapper, Person> implements PersonService {

    @Autowired
    PersonMapper personMapper;

    @Override
    public Person getOne(Person person) {
        QueryWrapper<Person> wrapper = new QueryWrapper<>(person);
        return personMapper.selectOne(wrapper);
    }
}
